package cn.com.generaldata.os.vo;

import lombok.Data;

import org.apache.commons.lang3.StringUtils;

/**
 * 报表形式指标汇总查询条件VO
 */
@Data
public class ReportStatVO {

	public static final String RESULT_TYPE_ORI = "ori";
	public static final String RESULT_TYPE_STAT = "stat";

	/** 统计制度 */
	private Integer statSystem;

	/** 报表类型id */
	private String reportTypeId;

	/** 统计频率 */
	private Integer frequency;

	private Integer year;

	private Integer yearTime;

	private Integer quarter;

	private Integer month;

	/** 省区划代码id */
	private String provinceId;

	/** 市地区id **/
	private String cityId;

	/** 县地区id **/
	private String countyId;

	private String resultType;

	/** 指标id */
	private Integer indicatorId;

	private String masterColumnValue;

	public String getQueryAreaId() {
		String queryAreaid = "";
		if (StringUtils.isBlank(cityId) && StringUtils.isBlank(countyId)) {
			queryAreaid = provinceId;
		}
		if (StringUtils.isNotBlank(cityId) && StringUtils.isBlank(countyId)) {
			queryAreaid = cityId;
		}
		if (StringUtils.isNotBlank(cityId) && StringUtils.isNotBlank(countyId)) {
			queryAreaid = countyId;
		}
		return queryAreaid;
	}

}
